.\" SPDX-License-Identifier: CC-BY-SA-4.0 or-later
.\" SPDX-FileCopyrightText: 2025 grommunio GmbH
.TH mod_cache 4gx "" "Gromox" "Gromox admin reference"
.SH Name
mod_cache \(em HTTP handler for serving objects from a local filesystem
.SH Description
mod_cache serves local files when certain URIs are requested. Note that
mod_fastcgi(4gx) has a table of its own and higher precedence.
.SH Configuration directives
This component shares \fBhttp.cfg\fP. See http(8gx).
.SH URI map
The filemap that specifies which URIs to handle is \fBcache.txt\fP,
which is searched for in \fIconfig_file_path\fP. The usual location is
/etc/gromox/cache.txt.
.PP
Each line in this file consists of 3 columns separated by whitespace:
.IP \(bu 4
Domain or wildcard to match the HTTP Host: header with.
.IP \(bu 4
URI path (prefix) to match
.IP \(bu 4
Target file/directory within the filesystem
.PP
If the file has no lines, no documents will be served this way.
If the file is absent however, a set of default entries will be used.
.SS Default entries
.nf
* /web /usr/share/grommunio-web
* /EWS/Messages.xsd /usr/share/gromox/Messages.xsd
* /EWS/Services.wsdl /usr/share/gromox/Services.wsdl
* /EWS/Types.xsd /usr/share/gromox/Types.xsd
.fi
.SH Files
.IP \(bu 4
\fIconfig_file_path\fP/cache.txt: URI map specifying which paths are served
.SH See also
\fBgromox\fP(7), \fBhttp\fP(8gx)
